﻿@{
    ViewBag.Title = "CircleClassDemo";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Circle Class Demo</h2>


<script src="/JS/Demo/Class/Circle.js" type="text/javascript"></script>
<script type="text/javascript">
    window.onload = function () {
        var c = new Circle(1.0);      // Create an instance of the Circle class
        c.r = 2.2;                    // Set the r instance property
        var a = c.area();             // Invoke the area() instance method
        ZEUS.DEBUG.log(c.toString());

        var x = Math.exp(Circle.PI);  // Use the PI class property in our own computation
        var d = new Circle(1.2);      // Create another Circle instance
        ZEUS.DEBUG.log(d.toString());

        var bigger = Circle.max(c, d); // Use the max() class method
        ZEUS.DEBUG.log("Bigger Circle:");
        ZEUS.DEBUG.log(bigger.toString());
    }
</script>